<?php

namespace partner\functions\wechat\lib\SaleInfo;


use partner\functions\wechat\lib\BaseWechatPartner;
use Exception;

class WeWorkInfo extends BaseWechatPartner
{
    protected $upload_properties = [
        'we_work_pics' => 5
    ];

    // 商家企业微信CorpID
    public $sub_corp_id = '';

    // 企业微信页面截图
    public $we_work_pics = [];

    public function setSubCorpId(string $sub_corp_id = "")
    {
        if (empty($sub_corp_id))
            throw new Exception("商家企业微信CorpID不能为空");

        $this->sub_corp_id = $sub_corp_id;
        return $this;
    }

    public function setWeWorkPics(array $we_work_pics = [])
    {
        if (empty($we_work_pics))
            throw new Exception("企业微信页面截图不能为空");
        $this->we_work_pics = $we_work_pics;
        return $this;
    }
}